<?php
namespace app\wechat\controller;

use app\lib\wx\Application;

class Index extends Base
{
    public function index() {

    }

    public function createMenu(){
        $wx = new Application();
        $data = [
            'button'=>[
                [
                    "type"=>"view",
                    "name"=>"商城",
                    "url"=>"http://myshop.wenlongli.com/"
                ],
                [
                    "type"=>"view",
                    "name"=>"供应商",
                    "url"=>"http://www.soso.com/"
                ]
            ]
        ];
        $res = $wx->menu()->add( $data );
        dump($res);
    }



}
